#pragma once
#ifndef _LINK_H_
#define _LINK_H_

#include <string>

namespace OpenDrive {

	class Predecessor {

	public:
		Predecessor(std::string type, std::string id, std::string contactPoint) :type(type), id(id), contactPoint(contactPoint) {}
		Predecessor() {}
		~Predecessor() {}
		void setId(std::string i) { id = i; }
		std::string getType() const
		{
			return type;
		}
		std::string getId() const
		{
			return id;
		}
		std::string getContactPoint() const
		{
			return contactPoint;
		}
	private:
		std::string type;
		std::string id;
		std::string contactPoint;

	};

	class Successor {

	public:
		Successor(std::string type, std::string id, std::string contactPoint) :type(type), id(id), contactPoint(contactPoint) {};
		Successor() {}
		~Successor() {}
		void setId(std::string i) { id = i; }
		std::string getType() const
		{
			return type;
		}
		std::string getId() const
		{
			return id;
		}
		std::string getContactPoint() const
		{
			return contactPoint;
		}
	private:
		std::string type;
		std::string id;
		std::string contactPoint;

	};

	class Neighbor {

	public:
		Neighbor(std::string side, std::string id, std::string direction) :side(side), id(id), direction(direction) {}
		Neighbor() {}
		~Neighbor() {}
		std::string getSide() const
		{
			return side;
		}
		std::string getId() const
		{
			return id;
		}
		std::string getDirection() const
		{
			return direction;
		}
	private:
		std::string side;
		std::string id;
		std::string direction;
	};

	class Link
	{
	public:
		Link() {}
		~Link(){}
		void setSuccessor(Successor* s) { successor.reset(s); }
		void setPredecessor(Predecessor* p) { predecessor.reset(p); }
		const Successor* const getSuccessor() const { return successor.get(); }
		const Predecessor* const getPredecessor() const{ return predecessor.get(); }
	private:
		std::shared_ptr<Successor> successor;
		std::shared_ptr<Predecessor> predecessor;
	};

}

#endif // !_LINK_H_